home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 61 / Quick PC 61.iso / I386 / SASETUP.MSI / F77689_Multiple_Log_Details.asp < prev    next >
Encoding:
Text File  |  2003-02-21  |  20.5 KB  |  646 lines

  1.  
  2. <%@ Language=VBScript       %>
  3. <%    Option Explicit            %>
  4. <%
  5.     '-------------------------------------------------------------------------
  6.     ' Multiple_Log_Details.asp: Serves in listing all the Multiple logs 
  7.     ' Copyright (c) Microsoft Corporation.  All rights reserved. 
  8.     '-------------------------------------------------------------------------
  9. %>
  10.     
  11.     <!-- #include virtual="/admin/inc_framework.asp" -->
  12.     <!-- #include virtual="/admin/ots_main.asp" -->
  13.     <!-- #include file="loc_Log.asp" -->
  14.     <!-- #include file="inc_Log.asp" -->
  15.     
  16. <%
  17.     '-------------------------------------------------------------------------
  18.     ' Global Constants
  19.     '-------------------------------------------------------------------------
  20.     Const NAME_COLUMN = 0
  21.     Const TYPE_COLUMN = 1
  22.     Const DATE_COLUMN = 2
  23.     Const SIZE_COLUMN = 3
  24.     Const LOGS_PER_PAGE = 100    
  25.  
  26.     Dim SOURCE_FILE
  27.     Const ENABLE_TRACING = TRUE
  28.     SOURCE_FILE = SA_GetScriptFileName()
  29.  
  30.     '-------------------------------------------------------------------------
  31.     ' Global Variables
  32.     '-------------------------------------------------------------------------
  33.     
  34.     Dim page        'Variable for page creation 
  35.     Dim rc            'Return value for CreatePage
  36.     
  37.     'frame work variables
  38.     Dim g_Type
  39.     Dim g_bSearchChanged
  40.     Dim g_bSearchRequested
  41.     Dim g_iSearchCol
  42.     Dim g_sSearchColValue
  43.     Dim g_bPageChangeRequested
  44.     Dim g_sPageAction
  45.         
  46.     Dim g_bPagingInitialized
  47.     Dim g_iPageMin
  48.     Dim g_iPageMax
  49.     Dim g_iPageCurrent
  50.  
  51.     Dim g_iSortCol
  52.     Dim g_sSortSequence
  53.     
  54.     Dim G_PageTitle            'To get the title accordingly 
  55.     Dim G_strLogFilePath    'FilePath
  56.     
  57.     '-------------------------------------------------------------------------
  58.     ' Form Variables
  59.     '-------------------------------------------------------------------------
  60.     Dim F_strevent_title    'to get the log name.
  61.     
  62.     Dim L_PAGETITLE_LOGS_TEXT
  63.     Dim L_TABLETITLE_TEXT
  64.     
  65.     
  66.     'Getting the inputs from the earliear form
  67.     L_PAGETITLE_LOGS_TEXT= Request.QueryString("title")
  68.     
  69.     L_TABLETITLE_TEXT=Request.QueryString("title")
  70.     
  71.     G_PageTitle = GetTitle(Request.QueryString("Title"))
  72.  
  73.     '-------------------------------------------------------------------------
  74.     ' Entry Point
  75.     '-------------------------------------------------------------------------
  76.     ' Create Page
  77.     Call SA_CreatePage(G_PageTitle ,"",PT_AREA, page )
  78.     Call SA_ShowPage( page )
  79.     
  80.     '---------------------------------------------------------------------
  81.     ' Function name:    OnInitPage
  82.     ' Description:        Called to signal first time processing for this page. 
  83.     ' Input Variables:    PageIn and EventArg
  84.     ' Output Variables:    PageIn and EventArg
  85.     ' Return Values:    True/False
  86.     ' Global Variables: None
  87.     ' Called to signal first time processing for this page. Use this method
  88.     ' to do first time initialization tasks. 
  89.     '---------------------------------------------------------------------
  90.     Public Function OnInitPage(ByRef PageIn, ByRef EventArg)
  91.         g_Type=Request.QueryString("type")
  92.         OnInitPage = TRUE
  93.         
  94.         If ( ENABLE_TRACING ) Then 
  95.             Call SA_TraceOut(SOURCE_FILE, "OnInitPage")
  96.         End If
  97.             
  98.         F_strevent_title  = Request.QueryString("Title")
  99.         ' Set default values
  100.         '
  101.         ' Sort first column in ascending sequence
  102.         g_iSortCol = 0
  103.         g_sSortSequence = "A"
  104.  
  105.         '
  106.         ' Paging needs to be initialized
  107.         g_bPagingInitialized = FALSE
  108.         '
  109.         ' Start on page #1
  110.         g_iPageCurrent = 1
  111.         
  112.     End Function
  113.     
  114.     '---------------------------------------------------------------------
  115.     ' Function name:    OnServeAreaPage
  116.     ' Description:        Called when the page needs to be served. 
  117.     ' Input Variables:    PageIn, EventArg
  118.     ' Output Variables:    PageIn and EventArg
  119.     ' Return Values:    TRUE to indicate no problems occured. FALSE to indicate errors.
  120.     '                    Returning FALSE will cause the page to be abandoned.
  121.     ' Global Variables: None
  122.     'Called when the page needs to be served. Use this method to serve content.
  123.     '---------------------------------------------------------------------
  124.     Public Function OnServeAreaPage(ByRef PageIn, ByRef EventArg)
  125.         
  126.         Call ServeCommonJavaScript()
  127.         
  128.         If ( ENABLE_TRACING ) Then 
  129.             Call SA_TraceOut(SOURCE_FILE, "OnServeAreaPage")
  130.         End If
  131.         
  132.         Dim table
  133.         Dim iColumnFleName
  134.         Dim iColumnFleType
  135.         Dim iColumnDatecreated
  136.         Dim iColumnSizeinKB
  137.         Dim nReturn
  138.         Dim nRowsAdded
  139.         Dim iLogCount
  140.                 
  141.         Dim objFso
  142.         Dim objDir
  143.         Dim objFile
  144.         Dim strFileType
  145.         Dim strLogFileDir
  146.         Dim colFlags
  147.  
  148.         Dim oEncoder
  149.         Set oEncoder = new CSAEncoder
  150.         
  151.             
  152.         'Getting the dir path from the registry 
  153.         strLogFileDir=GetPath(L_TABLETITLE_TEXT)
  154.         
  155.         table = OTS_CreateTable("","")
  156.         
  157.         'Getting the FilePath of the selected log file
  158.         G_strLogFilePath=GetPath(F_strevent_title)
  159.         G_strLogFilePath = Server.URLEncode(G_strLogFilePath)
  160.         '
  161.         ' If the search criteria changed then we need to recompute the paging range
  162.         If ( TRUE = g_bSearchChanged ) Then
  163.             '
  164.             ' Need to recalculate the paging range
  165.             g_bPagingInitialized = FALSE
  166.             '
  167.             ' Restarting on page #1
  168.             g_iPageCurrent = 1
  169.         End If
  170.  
  171.         '
  172.         ' Create columns and add them to the table
  173.         colFlags = (OTS_COL_SEARCH OR OTS_COL_KEY OR OTS_COL_SORT)
  174.         Call OTS_AddTableColumn(table, OTS_CreateColumnEx( L_FILENAME_TEXT, "left",colFlags, 15))
  175.         
  176.         colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  177.         Call OTS_AddTableColumn(table, OTS_CreateColumnEx(  L_FILETYPE_TEXT, "left",colFlags, 36))
  178.         
  179.         colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  180.         Call OTS_AddTableColumn(table, OTS_CreateColumnEx(  L_DATE_TEXT, "left",colFlags, 30))
  181.         
  182.         colFlags = (OTS_COL_SEARCH OR OTS_COL_SORT)
  183.         Call OTS_AddTableColumn(table, OTS_CreateColumnEx( L_SIZE_TEXT, "left",colFlags, 15))
  184.         
  185.         '
  186.         ' Set Tasks section title
  187.         Call OTS_SetTableTasksTitle(table,  L_TASKS_TEXT)
  188.  
  189.         '
  190.         ' Add the tasks associated with User objects
  191.     
  192.         Call OTS_AddTableTask( table, OTS_CreateTaskEx(L_VIEW_TEXT, _
  193.                                         L_VIEW_TEXT, _
  194.                                         "logs/Single_Log_Details.asp?" & "logtitle=" & L_PAGETITLE_LOGS_TEXT & "&tab1=" & GetTab1() & "&tab2=" & GetTab2() ,_
  195.                                         OTS_PT_AREA,_
  196.                                         "OTS_TaskOne") )            
  197.                 
  198.         Call OTS_AddTableTask( table, OTS_CreateTaskEx(L_CLEAR_TEXT, _
  199.                                         L_CLEAR_TEXT, _
  200.                                         "logs/Text_Log_clear.asp?FilePath="& G_strLogFilePath & "&tab1=" & GetTab1() & "&tab2=" & GetTab2(),_
  201.                                         OTS_PT_PROPERTY,"OTS_TaskAny") )    
  202.                                                     
  203.         Call OTS_AddTableTask( table, OTS_CreateTaskEx(L_DOWNLOAD_DETAILS_TEXT, _
  204.                                         L_DOWNLOAD_DETAILS_TEXT, _
  205.                                         "logs/Text_MultiLog_download.asp?FilePath=" & G_strLogFilePath,_
  206.                                         OTS_PT_AREA,"OTS_TaskOne") )    
  207.         
  208.         'Logic for getting the files in the requested directory 
  209.         set objFso = CreateObject("Scripting.FileSystemObject")
  210.         
  211.         'Checking for the file existence
  212.         If  objFso.FolderExists(strLogFileDir)=TRUE Then
  213.             
  214.             set objDir = objFso.GetFolder(strLogFileDir).Files
  215.             
  216.             'Initializing the rows added
  217.             nRowsAdded = 0
  218.             
  219.             iLogCount = 0
  220.             
  221.             For Each objFile in objDir
  222.                 
  223.                 'Get the description of the file type
  224.                 strFileType = GetFileTypeDescription(mid(objFile.Name,1,2))
  225.                     
  226.                 If ( Len( g_sSearchColValue ) <= 0 ) Then
  227.                 
  228.                     ' Search criteria blank, select all rows
  229.                     '
  230.                     iLogCount = iLogCount + 1
  231.                     
  232.                     ' Verify that the current user part of the current page
  233.                     If ( IsItemOnPage( iLogCount,g_iPageCurrent, LOGS_PER_PAGE) ) Then
  234.                         Call OTS_AddTableRow( table,Array(objFile.Name,strFileType, _
  235.                                         FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  236.                     End If
  237.                 
  238.                     '
  239.                 Else
  240.                     '
  241.                     ' Check the Search criteria
  242.                     '
  243.                     Select Case (g_iSearchCol)
  244.                         
  245.                         Case NAME_COLUMN
  246.                             '( ucase(left( arrServices(intCount,1) , len(g_sSearchColValue) )) = ucase(g_sSearchColValue) )
  247.                             If ( ucase(left( objFile.Name , len(g_sSearchColValue) )) = ucase(g_sSearchColValue) )then
  248.                                 iLogCount = iLogCount + 1
  249.                                 '
  250.                                 ' Verify that the current user part of the current page
  251.                                 If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  252.                                     Call OTS_AddTableRow( table,Array(objFile.Name, _
  253.                                         strFileType, FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  254.                                 End If
  255.                             End If
  256.                                 
  257.                         Case TYPE_COLUMN
  258.                         
  259.                             If ( ucase(left( strFileType, len(g_sSearchColValue) )) = ucase(g_sSearchColValue) ) Then
  260.                                 iLogCount = iLogCount + 1
  261.                                 '
  262.                                 ' Verify that the current user part of the current page
  263.                                 If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  264.                                     Call OTS_AddTableRow( table,Array(objFile.Name, _
  265.                                         strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  266.                                 End If
  267.                             End If
  268.                             
  269.                         Case DATE_COLUMN
  270.                             If ( InStr(1, objFile.DateCreated, g_sSearchColValue, 1) ) Then
  271.                                 iLogCount = iLogCount + 1
  272.                                 '
  273.                                 ' Verify that the current user part of the current page
  274.                                 If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  275.                                     Call OTS_AddTableRow( table,Array(objFile.Name, _
  276.                                         strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  277.                                 End If
  278.                             End If
  279.                                 
  280.                         Case SIZE_COLUMN
  281.                             If ( InStr(1, clng(objFile.Size/1024), g_sSearchColValue, 1) ) Then
  282.                                 iLogCount = iLogCount + 1
  283.                                 '
  284.                                 ' Verify that the current user part of the current page
  285.                                 If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  286.                                     Call OTS_AddTableRow( table,Array(objFile.Name, _
  287.                                             strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  288.                                 End If
  289.                             End If
  290.                                 
  291.                         Case Else
  292.                             Call SA_TraceOut(SOURCE_FILE, "Unrecognized search column: " + CStr(g_iSearchCol))
  293.                             iLogCount = iLogCount + 1
  294.                             '
  295.                             ' Verify that the current user part of the current page
  296.                             If ( IsItemOnPage( iLogCount, g_iPageCurrent, LOGS_PER_PAGE) ) Then
  297.                                 Call OTS_AddTableRow( table,Array(objFile.Name, _
  298.                                             strFileType,FormatDateTime(CDate(objFile.DateCreated)),clng(objFile.Size/1024)))
  299.                             End If
  300.                         End Select
  301.                 End If ' end of   If ( g_bSearchRequested ) Then
  302.             Next ' end of For Each objFile in objDir    
  303.             
  304.         End IF   'end of If  objFso.FolderExists(strLogFileDir)=TRUE 
  305.         
  306.         ' Enable paging feature
  307.         '
  308.         Call OTS_EnablePaging(table, TRUE)
  309.                 
  310.         '
  311.         ' If paging range needs to be initialised then
  312.         ' we need to figure out how many pages we are going to display
  313.         If ( FALSE = g_bPagingInitialized ) Then
  314.             g_iPageMin = 1
  315.             
  316.             g_iPageMax = Int(iLogCount / LOGS_PER_PAGE )
  317.             If ( (iLogCount MOD LOGS_PER_PAGE) > 0 ) Then
  318.                 g_iPageMax = g_iPageMax + 1
  319.             End If
  320.             
  321.             g_iPageCurrent = 1
  322.             Call OTS_SetPagingRange(table, g_iPageMin, g_iPageMax, g_iPageCurrent)
  323.         End If
  324.         
  325.             '
  326.         ' If multiselection was requested then use multiselect OTS table
  327.         If ( CInt(Request.QueryString("MultiSelect")) = 1 ) Then
  328.             Call OTS_SetTableMultiSelection(Table, TRUE)
  329.         End If
  330.         
  331.         '
  332.         ' Sort the table
  333.         '
  334.         Call OTS_SortTable(table, g_iSortCol, g_sSortSequence, SA_RESERVED)
  335.         
  336.         '
  337.         ' Send table to the response stream
  338.         '
  339.         Call OTS_ServeTable(table)
  340.         
  341.         'Display no log entries message if there are no logs
  342.         If iLogCount = 0 then
  343.             Response.Write "<Br>" & "   " & oEncoder.EncodeElement(L_NOLOGSAVAILABLE_TEXT)
  344.         End if    
  345.         
  346.         'clean the objects
  347.         set objDir = nothing
  348.         set objFso = nothing
  349.        
  350.         
  351.         OnServeAreaPage = TRUE
  352.     End Function
  353.     
  354.     
  355.     '---------------------------------------------------------------------
  356.     ' Function:    OnSearchNotify()
  357.     '
  358.     ' Synopsis:    Search notification event handler. When one or more columns are
  359.     '            marked with the OTS_COL_SEARCH flag, the Web Framework fires
  360.     '            this event in the following scenarios:
  361.     '
  362.     '            1) The user presses the search Go button.
  363.     '            2) The user requests a table column sort
  364.     '            3) The user presses either the page next or page previous buttons
  365.     '
  366.     '            The EventArg indicates the source of this notification event which can
  367.     '            be either a search change event (scenario 1) or a post back event 
  368.     '            (scenarios 2 or 3)
  369.     '
  370.     ' Returns:    Always returns TRUE
  371.     '
  372.     '---------------------------------------------------------------------
  373.     Public Function OnSearchNotify(ByRef PageIn, _
  374.                                         ByRef EventArg, _
  375.                                         ByVal sItem, _
  376.                                         ByVal sValue )
  377.         OnSearchNotify = TRUE
  378.  
  379.         '
  380.         ' User pressed the search GO button
  381.         '
  382.         If SA_IsChangeEvent(EventArg) Then
  383.             If ( ENABLE_TRACING ) Then 
  384.                 Call SA_TraceOut(SOURCE_FILE, "OnSearchNotify() Change Event Fired")
  385.             End If
  386.             g_bSearchChanged = TRUE
  387.             g_iSearchCol = Int(sItem)
  388.             g_sSearchColValue = CStr(sValue)
  389.         '
  390.         ' User clicked a column sort, OR clicked either the page next or page prev button
  391.         ElseIf SA_IsPostBackEvent(EventArg) Then
  392.             If ( ENABLE_TRACING ) Then 
  393.                 Call SA_TraceOut(SOURCE_FILE, "OnSearchNotify() Postback Event Fired")
  394.             End If
  395.             g_bSearchChanged = FALSE
  396.             g_iSearchCol = Int(sItem)
  397.             g_sSearchColValue = CStr(sValue)
  398.         '
  399.         ' Unknown event source
  400.         Else
  401.             If ( ENABLE_TRACING ) Then 
  402.                 Call SA_TraceOut(SOURCE_FILE, "Unrecognized Event in OnSearchNotify()")
  403.             End If
  404.         End IF
  405.             
  406.     End Function
  407.  
  408.  
  409.     '---------------------------------------------------------------------
  410.     ' Function:    OnPagingNotify()
  411.     '
  412.     ' Synopsis:    Paging notification event handler. This event is triggered in one of
  413.     '            the following scenarios:
  414.     '
  415.     '            1) The user presses either the page next or page previous buttons
  416.     '            2) The user presses the search Go button.
  417.     '            3) The user requests a table column sort
  418.     '
  419.     '            The EventArg indicates the source of this notification event which can
  420.     '            be either a paging change event (scenario 1) or a post back event 
  421.     '            (scenarios 2 or 3)
  422.     '
  423.     '            The iPageCurrent argument indicates which page the user has requested.
  424.     '            This is an integer value between iPageMin and iPageMax.
  425.     '
  426.     ' Returns:    Always returns TRUE
  427.     '
  428.     '---------------------------------------------------------------------
  429.     Public Function OnPagingNotify(ByRef PageIn, _
  430.                                         ByRef EventArg, _
  431.                                         ByVal sPageAction, _
  432.                                         ByVal iPageMin, _
  433.                                         ByVal iPageMax, _
  434.                                         ByVal iPageCurrent )
  435.         OnPagingNotify = TRUE
  436.             
  437.         g_bPagingInitialized = TRUE
  438.             
  439.         '
  440.         ' User pressed either page next or page previous
  441.         '
  442.         If SA_IsChangeEvent(EventArg) Then
  443.             If ( ENABLE_TRACING ) Then 
  444.                 Call SA_TraceOut(SOURCE_FILE, "OnPagingNotify() Change Event Fired")
  445.             End If
  446.             g_bPageChangeRequested = TRUE
  447.             g_sPageAction = CStr(sPageAction)
  448.             g_iPageMin = iPageMin
  449.             g_iPageMax = iPageMax
  450.             g_iPageCurrent = iPageCurrent
  451.         '
  452.         ' User clicked a column sort OR the search GO button
  453.         ElseIf SA_IsPostBackEvent(EventArg) Then
  454.             If ( ENABLE_TRACING ) Then 
  455.                 Call SA_TraceOut(SOURCE_FILE, "OnPagingNotify() Postback Event Fired")
  456.             End If
  457.             g_bPageChangeRequested = FALSE
  458.             g_sPageAction = CStr(sPageAction)
  459.             g_iPageMin = iPageMin
  460.             g_iPageMax = iPageMax
  461.             g_iPageCurrent = iPageCurrent
  462.         '
  463.         ' Unknown event source
  464.         Else
  465.             If ( ENABLE_TRACING ) Then 
  466.                 Call SA_TraceOut(SOURCE_FILE, "Unrecognized Event in OnPagingNotify()")
  467.             End If
  468.         End IF
  469.             
  470.     End Function
  471.     
  472.     
  473.     '---------------------------------------------------------------------
  474.     ' Function name:    OnSearchNotify()
  475.     ' Description:        Search notification event handler. When one or more columns are
  476.     '                    marked with the OTS_COL_SEARCH flag, the Web Framework fires
  477.     '                    this event
  478.     ' Input Variables:    PageIn,EventArg,sItem,sValue
  479.     ' Output Variables:    PageIn,EventArg,sItem,sValue
  480.     ' Returns:    Always returns TRUE
  481.     '---------------------------------------------------------------------
  482.     Public Function OnSearchNotify(ByRef PageIn, _
  483.                                         ByRef EventArg, _
  484.                                         ByRef sItem, _
  485.                                         ByRef sValue )
  486.             OnSearchNotify = TRUE
  487.  
  488.             '
  489.             ' User pressed the search GO button
  490.             '
  491.             If SA_IsChangeEvent(EventArg) Then
  492.                 g_bSearchRequested = TRUE
  493.                 g_iSearchCol = Int(sItem)
  494.                 g_sSearchColValue = CStr(sValue)
  495.             '
  496.             ' User clicked a column sort, OR clicked either the page next or page prev button
  497.             ElseIf SA_IsPostBackEvent(EventArg) Then
  498.                 g_bSearchRequested = FALSE
  499.                 g_iSearchCol = Int(sItem)
  500.                 g_sSearchColValue = CStr(sValue)
  501.             '
  502.             ' Unknown event source
  503.             Else
  504.                 'Call SA_TraceOut("LOGS_AREA", "Unrecognized Event in OnSearchNotify()")
  505.             End IF
  506.             
  507.             
  508.     End Function
  509.  
  510.     '---------------------------------------------------------------------
  511.     ' Function:            OnPagingNotify()
  512.     ' Function name:    OnPagingNotify()
  513.     ' Description:        Paging notification event handler.                
  514.     ' Input Variables:    PageIn,EventArg,sPageAction,iPageMin,iPageMax,iPageCurrent
  515.     ' Output Variables:    PageIn,EventArg
  516.     ' Return Values:    Always returns TRUE
  517.     ' Global Variables: G_*
  518.     '---------------------------------------------------------------------
  519.     Public Function OnPagingNotify(ByRef PageIn, _
  520.                                         ByRef EventArg, _
  521.                                         ByVal sPageAction, _
  522.                                         ByVal iPageMin, _
  523.                                         ByVal iPageMax, _
  524.                                         ByVal iPageCurrent )
  525.             OnPagingNotify = TRUE
  526.             
  527.             g_bPagingInitialized = TRUE
  528.             
  529.             '
  530.             ' User pressed either page next or page previous
  531.             '
  532.             If SA_IsChangeEvent(EventArg) Then
  533.                 g_bPageChangeRequested = TRUE
  534.                 g_sPageAction = CStr(sPageAction)
  535.                 g_iPageMin = iPageMin
  536.                 g_iPageMax = iPageMax
  537.                 g_iPageCurrent = iPageCurrent
  538.             '
  539.             ' User clicked a column sort OR the search GO button
  540.             ElseIf SA_IsPostBackEvent(EventArg) Then
  541.                 g_bPageChangeRequested = FALSE
  542.                 g_sPageAction = CStr(sPageAction)
  543.                 g_iPageMin = iPageMin
  544.                 g_iPageMax = iPageMax
  545.                 g_iPageCurrent = iPageCurrent
  546.             '
  547.             ' Unknown event source
  548.             Else
  549.                 'Call SA_TraceOut("LOGS_AREA", "Unrecognized Event in OnPagingNotify()")
  550.             End IF
  551.             
  552.     End Function
  553.     
  554.     '---------------------------------------------------------------------
  555.     ' Function:            OnSortNotify()
  556.     ' Function name:    GetServices
  557.     ' Description:        Sorting notification event handler.
  558.     ' Input Variables:    PageIn,EventArg,sortCol,sortSeq
  559.     ' Output Variables:    PageIn,EventArg
  560.     ' Return Values:    Always returns TRUE
  561.     ' Global Variables: G_*
  562.     '---------------------------------------------------------------------
  563.     Public Function OnSortNotify(ByRef PageIn, _
  564.                                         ByRef EventArg, _
  565.                                         ByVal sortCol, _
  566.                                         ByVal sortSeq )
  567.         OnSortNotify = TRUE
  568.             
  569.         g_iSortCol = sortCol
  570.         g_sSortSequence = sortSeq
  571.             
  572.     End Function
  573.      
  574.     '-------------------------------------------------------------------------
  575.     ' Function name:        GetFileTypeDescription
  576.     ' Description:            gives the description of the type of file
  577.     ' Input Variables:        Filetype
  578.     ' Output Variables:        None
  579.     ' Return Values:        String
  580.     ' Global Variables:        None
  581.     '-------------------------------------------------------------------------
  582.     Function GetFileTypeDescription( strFileType ) 
  583.         
  584.         Dim strTemp
  585.         
  586.         'constants used for the description of the type of file 
  587.         Const CONST_EX    =    "ex"
  588.         Const CONST_IN    =    "in" 
  589.         Const CONST_NC    =    "nc"
  590.         
  591.         
  592.         select case strFileType
  593.             case CONST_EX
  594.                 strTemp = L_LOGFORMATW3C_TEXT    
  595.             case CONST_IN
  596.                 strTemp = L_LOGFORMATIIS_TEXT                
  597.             case CONST_NC
  598.                 strTemp = L_LOGFORMATNCSA_TEXT                            
  599.             case else
  600.                 strTemp = L_LOGFORMATUNKNOWN_TEXT
  601.         end select    
  602.         
  603.         GetFileTypeDescription=strTemp
  604.     End Function
  605.     
  606.     '---------------------------------------------------------------------
  607.     ' Function:    ServeCommonJavaScript
  608.     '
  609.     ' Synopsis:    Serve common javascript that is required for this page type.
  610.     '
  611.     '---------------------------------------------------------------------
  612.     Function ServeCommonJavaScript()
  613.     %>
  614.     <script>
  615.     function Init()
  616.     {
  617.     }
  618.     </script>
  619.     <%
  620.     End Function    
  621.     
  622.     '-------------------------------------------------------------------------
  623.     ' Function name:    IsItemOnPage
  624.     ' Description:        Serves in Verifying that the current user part of the current page
  625.     ' Input Variables:    iCurrentItem, iCurrentPage, iItemsPerPage- current item 
  626.     ' Output Variables:    None
  627.     ' Return Values:    TRUE/FALSE
  628.     ' Global Variables: None
  629.     ' Serves in Verifying that the current user part of the current page
  630.     '-------------------------------------------------------------------------
  631.     Private Function IsItemOnPage(ByVal iCurrentItem, iCurrentPage, iItemsPerPage)
  632.         Dim iLowerLimit
  633.         Dim iUpperLimit
  634.  
  635.         iLowerLimit = ((iCurrentPage - 1) * iItemsPerPage )
  636.         iUpperLimit = iLowerLimit + iItemsPerPage + 1
  637.         
  638.         If ( iCurrentItem > iLowerLimit AND iCurrentItem < iUpperLimit ) Then
  639.             IsItemOnPage = TRUE
  640.         Else
  641.             IsItemOnPage = FALSE
  642.         End If
  643.         
  644.     End Function
  645. %>
  646.